#include <stdio.h>

int main(int argc, char *argv[])
{
	float i,F,C;
	for(int j=1;j<=3;j++)
	{
		scanf("%f",&i);
		
		if(i==1)
		{
			scanf("%f",&F);
			C=(F-32)*5/9;
			printf("The Centigrade is %.2f",C);
		}
		
		if(i==2)
		{
			scanf("%f",&C);
			F=C*9/5+32;
			printf("The Fahrenheit is %.2f",F);
		}
		if(i!=1&&i!=2) printf("Wrong input!");
		printf("\n");
	
	}
}